<?php
/**
 * XGPHP 轻量级PHP框架
 * @link http://xgphp.xg3.cn
 * @version 2.0.0
 * @license http://www.apache.org/licenses/LICENSE-2.0
 * @author 讯高科技 <xungaokeji@qq.com>
*/
namespace xg\response;
use \xg\facade\View as XgView;

class View extends Html {
	public function fetch($tpl='',$data=[]) {
		if(is_array($tpl)) {
			$data = $tpl;
			$tpl = '';
		}
		XgView::assign($data);
		$this->content = XgView::fetch($tpl);
		return $this;
	}
}
?>